defineAnimation
Type
command
Summary
Defines a reusable keyframe animation sequence.
Syntax
defineAnimation <pName>, <pKeyframes>, <pDuration>, <pEasing>
Description
Use this command to create a reusable animation sequence that can be applied to multiple objects. The keyframes array should contain percentage-based keys (e.g., "0", "50", "100") with property:value pairs defining the state at each keyframe.
Parameters
Name | Type | Description |
---|---|---|
pName | Unique identifier for this animation sequence, preferably a descriptive name | |
pKeyframes | Array containing keyframe definitions with percentage keys (e.g., "0", "50", "100") | |
pDuration | Duration in seconds | |
pEasing | Easing function to apply between keyframes |
Examples
local tKeyframes
put "left:100;top:100" into tKeyframes["0"]
put "left:200;top:200" into tKeyframes["50"]
put "left:300;top:100" into tKeyframes["100"]
defineAnimation "bounce", tKeyframes, 1, "inOutQuad"
Compatibility and Support
OS
mac
windows
linux
ios
android
Platforms
desktop
mobile
web